import request from '@/utils/request'

// crm 新建设备清单申请
export function crmPreSalesSave(data) {
  return request({
    url: 'CrmPreSales/addOrUpdate',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// crm 根据ID获取设备清单字段信息
export function crmPreSalesRead(data) {
  return request({
    url: 'CrmPreSales/queryById',
    method: 'post',
    data: data
  })
}

/**
 * 变更责任人
 * @param {*} data
 */
export function crmPreSalesChangeOwnerUser(data) {
  return request({
    url: 'CrmPreSales/changeOwnerUser',
    method: 'post',
    data: data
  })
}

/**
 * 变更责任人
 * @param {*} data
 */
export function crmAcceptPreSales(data) {
  return request({
    url: 'CrmPreSales/acceptPreSales',
    method: 'post',
    data: data
  })
}

// crm 客户列表
export function crmPreSalesIndex(data) {
  return request({
    url: 'CrmPreSales/queryPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}


/**
 * 删除设备清单信息
 * @param {*} data
 */
export function crmPreSalesDelete(data) {
  return request({
    url: 'CrmPreSales/deleteByIds',
    method: 'post',
    data: data
  })
}

/**
 * 转移设备清单信息
 * @param {*} data
 */
export function crmPreSalesTransfer(data) {
  return request({
    url: '/CrmPreSales/transfer',
    method: 'post',
    data: data
  })
}
